<template>
  <div class="box-shadow">
    <!-- 搜索 -->
    <div class="search-area">
      <div class="form">
        <el-form
          label-width="146px"
          :model="listQuery"
          ref="listQuery"
          size="small"
          :inline="true"
        >
          <el-form-item :label="$t('巡检对象名称') + ':'" prop="deviceName">
            <el-input
              v-model="listQuery.deviceName"
              :placeholder="$t('请输入')"
              clearable
              size="medium"
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
          <el-form-item :label="$t('巡检点名称') + ':'" prop="viewPointName">
            <el-input
              v-model="listQuery.viewPointName"
              :placeholder="$t('请输入')"
              clearable
              size="medium"
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
          <el-form-item :label="$t('识别类型') + ':'" prop="identifyType">
            <el-select
              v-model="listQuery.identifyType"
              :placeholder="$t('请选择')"
              clearable
              size="medium"
            >
              <el-option
                v-for="dict in dict.type.recognition"
                :key="dict.value"
                :label="dict.label"
                :value="dict.value"
              />
            </el-select>
          </el-form-item>
          <el-form-item
            label-width="100px"
            :label="$t('数据类型') + ':'"
            prop="dataType"
          >
            <el-select
              v-model="listQuery.dataType"
              :placeholder="$t('请选择')"
              clearable
              size="medium"
            >
              <el-option
                v-for="dict in dict.type.structType"
                :key="dict.value"
                :label="dict.label"
                :value="dict.value"
              />
            </el-select>
          </el-form-item>

          <!-- <el-form-item :label="$t('审核状态') + ':'">
            <el-checkbox-group v-model="listQuery.checkStatusList">
              <el-checkbox label="0">{{ $t("未审核") }}</el-checkbox>
              <el-checkbox label="1">{{ $t("已审核") }}</el-checkbox>
            </el-checkbox-group>
          </el-form-item> -->
          <el-form-item :label="$t('开始时间') + ':'">
            <el-date-picker
              style="width: 215px"
              v-model="listQuery.startTime"
              type="datetime"
              size="medium"
              :placeholder="$t('选择开始时间')"
              format="yyyy-MM-dd HH:mm:ss"
              value-format="yyyy-MM-dd HH:mm:ss"
              default-time="['00:00:00', '23:59:59']"
            >
            </el-date-picker>
          </el-form-item>
          <el-form-item :label="$t('结束时间') + ':'">
            <el-date-picker
              style="width: 215px"
              v-model="listQuery.endTime"
              type="datetime"
              size="medium"
              :placeholder="$t('选择结束时间')"
              :picker-options="pickerOptionsEnd"
              format="yyyy-MM-dd HH:mm:ss"
              value-format="yyyy-MM-dd HH:mm:ss"
              default-time="['00:00:00', '23:59:59']"
            >
            </el-date-picker>
          </el-form-item>
          <el-form-item :label="$t('告警等级') + ':'">
            <el-checkbox-group v-model="listQuery.alarmLevelList">
              <el-checkbox label="4">{{ $t("危急告警") }}</el-checkbox>
              <el-checkbox label="3">{{ $t("严重告警") }}</el-checkbox>
              <el-checkbox label="2">{{ $t("一般告警") }}</el-checkbox>
              <el-checkbox label="1">{{ $t("预警") }}</el-checkbox>
              <el-checkbox label="0">{{ $t("正常") }}</el-checkbox>
            </el-checkbox-group>
          </el-form-item>
        </el-form>
      </div>
      <div class="search-area-btn btns">
        <div @click="serachBtn" class="serch-btn cuver-point">
          {{ $t("搜索") }}
        </div>
        >
        <div @click="resetFormBtn('listQuery')" class="reset-btn cuver-point">
          {{ $t("重置") }}
        </div>
      </div>
    </div>
    <!-- 表格 -->
    <div class="table">
      <div class="search-area-btn btns defaultVal" style="width: 1000px">
        <el-dropdown @command="defaultReport">
          <el-button type="primary">
            {{ $t("导出巡检报告")
            }}<i class="el-icon-arrow-down el-icon--right"></i>
          </el-button>

          <el-dropdown-menu slot="dropdown">
            <el-dropdown-item
              :command="item.value"
              v-for="item in options"
              :key="item.value"
              >{{ item.label }}</el-dropdown-item
            >
          </el-dropdown-menu>
        </el-dropdown>
        <!-- <div
          class="serch-btn cursor-pointer table-top"
          style="width: 120px"
          @click="defaultReport()"
        >
          {{ $t("导出PDF") }}
        </div> -->
        <div
          @click="defaultExcel()"
          class="serch-btn cursor-pointer table-top"
          style="width: 120px"
        >
          {{ $t("导出Excel") }}
        </div>
        <div
          @click="exportResource"
          class="serch-btn2 cursor-pointer table-top"
        >
          {{ $t("导出采集资源") }}
        </div>
      </div>
      <div class="self">
        <el-table
          ref="tableRef"
          :data="tableData"
          tooltip-effect="dark"
          style="width: 100%; margin-top: 16px"
          @selection-change="selectionChange"
        >
          <!-- <el-table-column width="55" type="selection"> </el-table-column> -->
          <el-table-column
            align="center"
            prop="deviceName"
            :label="$t('巡检对象名称')"
          >
          </el-table-column>
          <el-table-column
            width="230"
            align="center"
            prop="viewPointName"
            :label="$t('关联巡检点名称')"
          >
          </el-table-column>
          <el-table-column
            align="center"
            prop="createTime"
            :label="$t('识别时间')"
          >
          </el-table-column>
          <el-table-column
            align="center"
            prop="recognitionName"
            :label="$t('识别类型')"
          >
          </el-table-column>
          <el-table-column
            align="center"
            prop="deviceResult"
            :label="$t('识别结果')"
          >
            <template slot-scope="scope">
              <span v-if="scope.row.deviceResult != null">{{
                scope.row.deviceResult + scope.row.unit
              }}</span>
              <span v-else>{{
                scope.row.deviceResult ? scope.row.deviceResult : "-"
              }}</span>
            </template>
          </el-table-column>
          <el-table-column
            align="center"
            prop="alarmLevelName"
            :label="$t('告警等级')"
          >
            <template slot-scope="scope">
              <div
                :class="[
                  scope.row.alarmLevelName == $t('危急告警') ? 'critical' : '',
                  scope.row.alarmLevelName == $t('严重告警') ? 'severity' : '',
                  scope.row.alarmLevelName == $t('一般告警') ? 'common' : '',
                  scope.row.alarmLevelName == $t('预警') ? 'early' : '',
                  scope.row.alarmLevelName == $t('正常') ? 'normal' : '',
                ]"
              >
                {{ scope.row.alarmLevelName }}
              </div>
            </template>
          </el-table-column>
          <el-table-column
            align="center"
            prop="pickInfo"
            :label="$t('采集信息')"
            show-overflow-tooltip
          >
            <template slot-scope="scope">
              <img
                src="../../../assets/images/objectData/picture.png"
                alt=""
                title="甲烷遥测"
                @click="methaneClick(scope.row)"
                v-if="scope.row.recognition == 9"
                style="width: 24px; height: 24px; cursor: pointer"
              />
              <span
                v-else
                v-for="(item, index) in scope.row.resourceType"
                :key="index"
                class="column-imgs"
              >
                <img
                  src="../../../assets/images/objectData/picture.png"
                  alt=""
                  @click="rowClick(scope.row, index, 'showPic')"
                  v-if="item == '0'"
                />
                <img
                  src="../../../assets/images/objectData/video.png"
                  alt=""
                  @click="rowClick(scope.row, index, 'showVideo')"
                  v-if="item == '1'"
                />
                <img
                  src="../../../assets/images/objectData/audio.png"
                  alt=""
                  @click="rowClick(scope.row, index, 'showAudio')"
                  v-if="item == '2'"
                />
                <span v-if="item == -1 || item == ''">{{ $t("-") }}</span>
              </span>
            </template>
          </el-table-column>
          <el-table-column
            align="center"
            prop="checkStatus"
            :label="$t('审核状态')"
          >
            <template slot-scope="scope">
              <div
                :style="{
                  color: scope.row.checkStatus == 0 ? '' : 'gray',
                }"
              >
                {{ scope.row.checkStatus == 0 ? $t("未审核") : $t("已审核") }}
              </div>
            </template>
          </el-table-column>
          <el-table-column :label="$t('操作')" align="center">
            <template slot-scope="scope">
              <div class="table-btns">
                <!-- <div @click="handle(scope.row)" class="serch-btn cuver-point">
                  审核
                </div> -->
                <div
                  class="serch-btn2 cursor-pointer"
                  @click="identifyClick(scope.row)"
                >
                  {{ $t("重新识别") }}
                </div>
              </div>
            </template>
          </el-table-column>
        </el-table>
      </div>
      <div class="pagenation">
        <pagination
          :total="total"
          :page.sync="listQuerySubmit.pageNum"
          :limit.sync="listQuerySubmit.pageSize"
          @pagination="getTableList"
        >
        </pagination>
      </div>
    </div>
    <!-- dialog -->
    <el-dialog
      :title="$t('查看')"
      :visible.sync="dialogVisible"
      width="560px"
      @close="closeDialog"
      style="margin-top: 30vh !important"
    >
      <!-- 图片 -->
      <div
        v-if="
          dialogBooArr.find((item) => {
            return item.title == 'showPic';
          }).bool
        "
      >
        <div class="dialog-lineone">
          <div>{{ $t("拍摄时间") + "：" }}{{ dialogDetail.createTime }}</div>
          <div>{{ $t("文件名") + "：" }}{{ dialogDetail.resourceName }}</div>
          <div @click="downLoad" class="el-icon-download cursor-pointer"></div>
        </div>
        <div>
          {{ $t("图片") + "：" }}
          <img style="width: 100%" :src="dialogSrc" alt="" />
        </div>
      </div>
      <!-- 视频 -->
      <div
        v-if="
          dialogBooArr.find((item) => {
            return item.title == 'showVideo';
          }).bool
        "
      >
        <div class="dialog-lineone">
          <div>{{ $t("录制时间") + "：" }}{{ dialogDetail.createTime }}</div>
          <div>{{ $t("文件名") + "：" }}{{ dialogDetail.resourceName }}</div>
          <div @click="downLoad" class="el-icon-download cursor-pointer"></div>
        </div>
        <div>
          <video controls style="width: 100%" ref="showVideo">
            <source :src="dialogSrc" type="video/mp4" />
          </video>
        </div>
      </div>
      <!-- 音频 -->
      <div
        v-if="
          dialogBooArr.find((item) => {
            return item.title == 'showAudio';
          }).bool
        "
      >
        <div class="dialog-lineone">
          <div>{{ $t("录制时间") + "：" }}{{ dialogDetail.createTime }}</div>
          <div>{{ $t("文件名") + "：" }}{{ dialogDetail.resourceName }}</div>
          <div @click="downLoad" class="el-icon-download cursor-pointer"></div>
        </div>
        <div class="display:flex" v-if="currentAudioUrl.src != ''">
          <aplayer :music="currentAudioUrl" ref="showAudio"></aplayer>
          <div class="change-audio">
            <div class="reset-btn el-icon-arrow-left"></div>
            <div class="reset-btn el-icon-arrow-right"></div>
          </div>
        </div>
      </div>
      <div slot="footer" style="display: flex; justify-content: flex-end">
        <div class="reset-btn" @click="dialogVisible = false">
          {{ $t("取消") }}
        </div>
      </div>
    </el-dialog>
    <!-- 抽屉盒子 -->
    <el-drawer
      :title="$t('审核')"
      :visible.sync="drawerVisible"
      direction="rtl"
      :before-close="handleClose"
    >
      <el-form
        :model="drawerForm"
        ref="drawerRef"
        :rules="formRules"
        :inline="true"
        label-width="125px"
      >
        <el-form-item :label="$t('任务名称') + ':'" prop="name">
          <el-input v-model="drawerForm.name" autocomplete="off"></el-input>
        </el-form-item>
        <el-form-item :label="$t('当前模板')" prop="templateName">
          <el-input
            v-model="drawerForm.templateName"
            disabled
            autocomplete="off"
          ></el-input>
        </el-form-item>
        <el-form-item label="巡检速度：" prop="speed">
          <el-radio-group v-model="drawerForm.speed">
            <el-radio label="1">{{ $t("低速") }}</el-radio>
            <el-radio label="2">{{ $t("中速") }}</el-radio>
            <el-radio label="3">{{ $t("高速") }}</el-radio>
          </el-radio-group>
        </el-form-item>
      </el-form>
      <div class="demo-drawer__footer drawer-footer">
        <div @click="submitBtn" class="serch-btn">{{ $t("保存") }}</div>
        <div @click="drawerVisible = false" class="reset-btn">
          {{ $t("取消") }}
        </div>
      </div>
    </el-drawer>
    <!-- 重新识别弹框 -->
    <IdentifyDialog
      :identifyVisible="identifyVisible"
      @taskDialogConfirm="identifyConfirm"
      @taskDialogCancle="identifyCancle"
    ></IdentifyDialog>
    <MethaneDialog ref="methane_dialog"></MethaneDialog>
  </div>
</template>
<script>
/**
 * 数据中心-巡检记录-巡检对象维度
 */
import IdentifyDialog from "./components/IdentifyDialog.vue";
import aplayer from "vue-aplayer";
import * as echarts from "echarts";
import screenfull from "screenfull";
import domtoimage from "dom-to-image";
import FileSaver from "file-saver";
import MethaneDialog from "@/components/MethaneDialog/index.vue";
import {
  API_getResourceinfo,
  API_devictpageInfoList,
  API_recognitionResult, //重新识别
  API_methaneGet, //甲烷遥测
} from "@/api/data/inspectrecords.js";

export default {
  name: "",
  props: {},
  dicts: ["recognition", "structType"],
  components: {
    aplayer,
    IdentifyDialog,
    MethaneDialog,
  },
  data() {
    return {
      sevePort: window.location.protocol + "//" + window.location.host,
      // sevePort: "http://192.168.61.11",
      drawerVisible: false, //是否打开抽屉盒子
      identifyVisible: false, //重新识别弹框
      rowTaskExecId: "",
      rowViewPointId: "",
      rowDeviceTreeId: "",
      drawerForm: {
        name: "",
        templateName: "",
        speed: "",
      },
      formRules: {
        name: [
          {
            required: true,
            message: this.$t("任务名称不能为空"),
            trigger: "blur",
          },
        ],
        templateName: [
          { required: true, message: this.$t("模板不能为空"), trigger: "blur" },
        ],
        speed: [
          {
            required: true,
            message: this.$t("巡检速度不能为空"),
            trigger: "change",
          },
        ],
      },
      // 结束日期
      pickerOptionsEnd: {
        disabledDate: (time) => {
          let beginDateVal = this.listQuery.startTime;
          if (beginDateVal) {
            return (
              time.getTime() <
              new Date(beginDateVal).getTime() + 1 * 24 * 60 * 60 * 1000
            );
          }
        },
      },
      listQuery: {
        // 查询条件
        deviceName: null,
        viewPointName: null, //巡检点名称
        identifyType: null,
        alarmLevelList: [],
        checkStatusList: [],
        dataType: [], //数据类型
        startTime: "", //开始时间
        endTime: "", //结束时间
        pageNum: 1,
        pageSize: 10,
      },
      tableData: [], // table数据
      selectedTableData: [], //表格选中数据
      // 选中数组
      ids: [],
      // 非单个禁用
      single: true,
      total: 0, // 分页总数
      listQuerySubmit: {}, // 提交参数
      dialogSrc: "", //弹框URL
      dialogDetail: {}, //弹框图片数据
      currentAudioUrl: {
        src: "",
      }, //音频
      dialogVisible: false, //图片dialog
      //控制弹框展示组件
      dialogBooArr: [
        {
          title: "showPic",
          bool: false,
        },
        {
          title: "showVideo",
          bool: false,
        },
        {
          title: "showAudio",
          bool: false,
        },
      ],
      taskName: this.$route.query.taskName,
      taskExecId: this.$route.query.taskExecId,
      progressStatus: this.$route.query.progressStatus,
      beginTime: this.$route.query.beginTime
        .replace(/ /g, "")
        .replace(/-/g, "")
        .replace(/:/g, ""),
      downLoadUrl: "",
      options: [
        {
          value: "0",
          label: this.$t("精简版PDF"),
        },
        {
          value: "1",
          label: this.$t("完整版PDF"),
        },
      ],
    };
  },
  created() {
    this.listQuerySubmit = Object.assign({}, this.listQuery);
    this.getTableList();
  },
  mounted() {
    // 监听窗口大小改变，screenfull.isFullscreen的值为是否全屏，若是则true，反之false
    window.onresize = () => {
      this.isScreenFull = screenfull.isFullscreen;
    };
  },
  computed: {},
  watch: {
    // methaneModal(newVal) {
    //   if (newVal) {
    //   }
    // },
  },
  methods: {
    //打开甲烷遥测弹框
    methaneClick(item) {
      this.$refs.methane_dialog.open(item);
    },
    /**重新识别 */
    identifyClick(row) {
      console.warn("rowrowrowrow", row);
      this.identifyVisible = true;
      this.rowTaskExecId = row.taskExecId;
      this.rowViewPointId = row.viewPointId;
      this.rowDeviceTreeId = row.deviceId;
    },
    /**重新识别 弹框确认 */
    identifyConfirm() {
      API_recognitionResult({
        taskExecId: this.rowTaskExecId,
        viewPointId: this.rowViewPointId,
        deviceTreeId: this.rowDeviceTreeId,
      })
        .then((res) => {
          if (res.code == 200) {
            this.$message.success(this.$t("重新识别命令已发送"));
          }
        })
        .finally(() => {
          this.identifyVisible = false;
          this.rowTaskExecId = "";
          this.rowViewPointId = "";
          this.rowDeviceTreeId = "";
        });
    },
    /**重新识别 弹框取消 */
    identifyCancle() {
      this.identifyVisible = false;
      this.$message.info(this.$t("已取消"));
    },
    /**搜索 */
    serachBtn() {
      this.listQuery.pageNum = 1;
      this.listQuerySubmit = Object.assign({}, this.listQuery);
      this.getTableList();
    },
    // 表格选中修改
    selectionChange(val) {
      this.selectedTableData = val;
      this.ids = val.map((item) => item.taskExecId);
      this.single = val.length !== 1;
    },
    /**采集资源数据 */
    getTableList() {
      const loading = this.$loading({
        lock: true,
        text: "Loading",
        spinner: "el-icon-loading",
        background: "rgba(0, 0, 0, 0.7)",
      });
      // 告警等级
      let alarmLevelList = this.listQuerySubmit.alarmLevelList;
      if (alarmLevelList && alarmLevelList.length > 0) {
        if (alarmLevelList.indexOf(",") == -1) {
          alarmLevelList = String(alarmLevelList);
        } else {
          alarmLevelList = alarmLevelList.join(",");
        }
      }
      // 审核状态
      let checkStatusList = this.listQuerySubmit.checkStatusList;
      if (checkStatusList && checkStatusList.length > 0) {
        if (checkStatusList.indexOf(",") == -1) {
          checkStatusList = String(checkStatusList);
        } else {
          checkStatusList = checkStatusList.join(",");
        }
      }
      let obj = {
        ...this.listQuerySubmit,
        alarmLevelList: alarmLevelList,
        checkStatusList: checkStatusList,
        taskExecId: this.taskExecId,
      };
      API_devictpageInfoList(obj)
        .then((res) => {
          if (res.code == 200) {
            if (res.rows.length > 0) {
              this.tableData = res.rows;
              this.tableData.forEach((item) => {
                let resourceType = item.resourceType || "";
                let resourceId = item.resourceId || "";
                item.resourceType = resourceType.split(",");
                item.resourceId = resourceId.split(",");
              });
            } else {
              this.tableData = [];
            }
            this.total = Number(res.total);
            this.listQuery = Object.assign({}, this.listQuerySubmit);
          }
        })
        .finally(() => {
          loading.close();
        });
    },
    // 处理
    handle() {
      this.drawerVisible = true;
    },
    /**表格点击视频音频事件 */
    rowClick(rowInfo, index, type) {
      const loading = this.$loading({
        lock: true,
        text: "Loading",
        spinner: "el-icon-loading",
        background: "rgba(0, 0, 0, 0.7)",
      });
      let id = rowInfo.resourceId[index];
      //展示图片、视频、音频
      this.dialogSrc = "";
      API_getResourceinfo({ id: id })
        .then((res) => {
          if (res.code == 200) {
            if (res.data) {
              this.dialogVisible = true;
              if (type == "showPic") {
                this.dialogSrc = this.sevePort + res.data.resourceUrl;
              } else if (type == "showVideo") {
                this.$nextTick(() => {
                  this.$refs.showVideo.src =
                    this.sevePort + res.data.resourceUrl;
                });
              } else if (type == "showAudio") {
                this.currentAudioUrl = {
                  src: this.sevePort + res.data.resourceUrl,
                  title: res.data.resourceName,
                };
              }
              this.dialogDetail = res.data;
              this.downLoadUrl = res.data.resourceUrl;
            } else {
              this.$message.error(this.$t("暂无数据"));
            }
          } else {
            this.dialogSrc = "";
            this.dialogDetail = {};
          }
        })
        .finally(() => {
          loading.close();
        });
      this.dialogBooArr.forEach((item) => {
        if (item.title == type) {
          item.bool = true;
        } else {
          item.bool = false;
        }
      });
    },
    downLoad() {
      this.$download.resource(this.downLoadUrl);
    },
    /**close dialog */
    closeDialog() {
      this.dialogVisible = false;
      this.dialogBooArr.forEach((item) => {
        if (item.title == "showPic") return;
        if (item.bool) {
          this.$refs[item.title].pause();
        }
      });
    },
    /**抽屉盒子关闭前 */
    handleClose() {
      this.drawerVisible = false;
      this.resetDrawerForm();
    },
    /**重置drawer表单内容 */
    resetDrawerForm() {
      this.drawerForm = {
        name: "",
        templateName: "",
        speed: "",
      };
    },
    /**保存 btn */
    submitBtn() {
      this.$refs["drawerRef"].validate((valid) => {
        if (valid) {
          this.drawerVisible = false;
        }
      });
    },
    defaultReport(command) {
      if (this.progressStatus == "5" || this.progressStatus == "6") {
        if (command == "0") {
          this.download(
            "/task.result/export.pdf?isSimple=true&execIds=" + this.taskExecId,
            {
              ...this.queryParams,
            },
            `${this.$t("导出巡检报告名称")}${this.taskName}_${
              this.beginTime
            }.pdf`
          );
        } else if (command == "1") {
          this.download(
            "/task.result/export.pdf?isSimple=false&execIds=" + this.taskExecId,
            {
              ...this.queryParams,
            },
            `${this.$t("导出巡检报告名称")}${this.taskName}_${
              this.beginTime
            }.pdf`
          );
        } else {
          return;
        }
      } else {
        this.$message.error(this.$t("巡检过程中不支持导出"));
      }
    },
    /**
     * 导出Excel
     */
    defaultExcel() {
      if (this.progressStatus == "5" || this.progressStatus == "6") {
        this.download(
          "/task.result/export.excel?execIds=" + this.taskExecId,
          {
            ...this.queryParams,
          },
          `${this.$t("导出巡检报告名称")}${this.taskName}_${
            this.beginTime
          }.xlsx`
        );
      } else {
        this.$message.error(this.$t("巡检过程中不支持导出"));
      }
    },
    /**导出采集资源 */
    exportResource() {
      this.download(
        "/task.result/export.task.resource?execId=" + this.taskExecId,
        {},
        `${this.$t("采集资源")}${this.taskName}_${this.beginTime}.zip`
      );
    },
    /** 重置按钮操作 */
    resetFormBtn(formName) {
      this.listQuery = {
        deviceName: null,
        viewPointName: null,
        identifyType: null,
        alarmLevelList: [],
        checkStatusList: [],
        dataType: [], //数据类型
        startTime: "", //开始时间
        endTime: "", //结束时间
      };
      this.serachBtn();
    },
  },
};
</script>

<style scoped lang="scss">
.methaneLabel {
  color: #a6acb1;
}
.img2 {
  margin-left: -114px;
}
.img-2 {
  position: relative;
  z-index: 222;
}
.img-1 {
  position: relative;
  margin-left: -114px;
  z-index: 111;
}
// .allImg {
//   div:nth-child(2) {
//     // transform: translateX(-50%);
//     margin-left: -114px;
//   }
//   div:nth-last-child(2) {
//     position: relative;
//     z-index: 222;
//   }
//   div:nth-last-child(1) {
//     position: relative;
//     margin-left: -114px;
//     z-index: 111;
//   }
// }
.table {
  width: 100%;
  height: 738px;
  padding: 24px;
  box-sizing: border-box;
  border-top: 1px dashed rgba(219, 255, 251, 0.2);
  position: relative;
  .btns {
    display: flex;
    width: 100%;
    justify-content: flex-start;
    div:nth-child(2) {
      margin: 0 16px;
    }
  }
  .table-btns {
    display: flex;
    justify-content: center;
    div {
      display: flex;
      // width: 46px;
      height: 28px;
      justify-content: center;
      align-items: center;
      font-size: 12px;
    }
    div:nth-child(2) {
      margin: 0 10px;
    }
    .gray {
      color: orange;
    }
    .green {
      color: #73f6af;
    }
  }
  .pagenation {
    position: absolute;
    bottom: 30px;
    right: 20px;
  }
}
.column-imgs {
  img {
    width: 24px;
    height: 24px;
    cursor: pointer;
  }
}
.drawer-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  div:nth-child(2) {
    margin-left: 16px;
  }
}
.critical {
  color: #ff5562;
}
.severity {
  color: #ff7000;
}
.common {
  color: #ffad30;
}
.early {
  color: #cc77dc;
}
.normal {
  color: #73f6af;
}
/** 音频播放器*/
.aplayer {
  background-color: transparent;
  color: #fff;
  .aplayer-body {
    display: flex;
    flex-direction: column;
    .aplayer-pic {
    }
  }
}
/**弹框样式 */
.dialog-lineone {
  display: flex;
  margin: 0 0 20px 0;
  div:nth-child(1) {
    width: 50%;
  }
  div:nth-child(2) {
    width: 45%;
  }
  div:nth-child(3) {
    width: 5%;
  }
}
.change-audio {
  display: flex;
  margin-top: 20px;
  justify-content: center;
  div:nth-child(2) {
    margin-left: 20px;
  }
}

::v-deep {
  .el-date-editor.el-input,
  .el-date-editor.el-input__inner {
    width: 195px;
  }
}
::v-deep {
  .defaultVal {
    .el-button {
      width: 126px;
      border-radius: 2px;
      border: 1px solid rgba(0, 209, 255, 0.7);
      background-color: rgba(0, 209, 255, 0.2);
      font-size: 13px;
      height: 32px;
      padding: 0;
    }
  }
  .perviewDialog {
    .el-dialog:not(.is-fullscreen) {
      margin-top: 30vh !important;
    }
  }
}
::v-deep {
  .el-tabs__item {
    color: rgba(255, 255, 255, 0.5);
  }
  .el-tabs__nav-wrap::after {
    background-color: rgba(241, 243, 249, 0.2) !important;
  }
  .el-tabs__nav-scroll {
    padding: 0 35px;
  }
  .el-tabs__item.is-active {
    color: rgba(0, 209, 255, 1);
  }
  .el-tabs__active-bar {
    width: 50px !important;
    left: 4px;
    background-color: rgba(0, 209, 255, 1);
  }
}
::v-deep {
  .el-checkbox {
    margin-right: 10px;
  }
  .self {
    .el-table__body-wrapper {
      width: 100%;
      max-height: 531px;
      overflow: auto;
    }
  }
}
</style>
<style lang="scss">
.perviewDialog .el-dialog:not(.is-fullscreen) {
  margin-top: 30vh !important;
}
.el-dropdown-menu {
  box-shadow: 0px 4px 40px 0px #000000;
  border-radius: 2px;
  width: 126px;
  background-color: #344a53;
  border: 0;
  .el-dropdown-menu__item {
    color: #fff;
    font-size: 13px;
    font-weight: 400;
    display: flex;
    justify-content: center;
  }
  .el-dropdown-menu__item:nth-child(1) {
    border-bottom: 1px solid #435b62;
  }
  .el-dropdown-menu__item:not(.is-disabled):hover {
    background-color: #344a53;
    color: #fff;
  }
}
</style>
